package com.v5.mr.partition;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.Reducer;


//把分区后的数据写到HDFS：按照相同部门号输出                                                                                                                         k4: 员工号    v4 员工信息
public class EmpPartionReducer extends Reducer<LongWritable, Employee, LongWritable, Employee> {

	@Override
	protected void reduce(LongWritable k3, Iterable<Employee> v3,Context context)
			throws IOException, InterruptedException {
		for(Employee e: v3){
			context.write(new LongWritable(e.getEmpno()), e);
		}
	}
}
